package com.gitee.jmash.storage.service;

import java.util.Set;
import java.util.UUID;
import com.gitee.jmash.core.orm.tenant.TenantService;
import com.gitee.jmash.storage.entity.StorageOrganUserEntity;
import com.gitee.jmash.storage.entity.StorageOrganUserEntity.StorageOrganUserPk;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jmash.storage.protobuf.StorageOrganUserCreateReq;

/**
 * storage_organ_user服务Write接口.
 *
 * @author <a href="mailto:service@crenjoy.com">crenjoy</a>
 */
public interface StorageOrganUserWrite extends TenantService {

  /** 插入实体. */
  public StorageOrganUserEntity insert(@NotNull @Valid StorageOrganUserCreateReq storageOrganUser);
  
  public StorageOrganUserEntity addOrganUser(@NotNull @Valid StorageOrganUserCreateReq req);

  /** 根据主键删除. */
  public StorageOrganUserEntity delete(@NotNull StorageOrganUserPk entityId);

  /** 根据主键数组删除. */
  public Integer batchDelete(@NotNull @Valid Set<@NotNull StorageOrganUserPk> entityIds);
  
  /**
   * 设置默认组织.
   */
  public StorageOrganUserEntity setMyDefaultOrgan(@NotNull UUID organId);
 
}
